import server from './server';

//币币交易
export const createOrder = (data) => { //币币交易下单
    return server.post('/exchange/create_order', data)
}

export const tranData = (data,hideloading) => { //交易记录
    return server.request('/exchange/order_list', {
        params: data,
        hideloading:!!hideloading
    })
}

export const symbolsData = (data) => { //获取币种详情
    return server.get('/exchange/symbols_data', {params:data})
}

export const cancellations = (data) => { //撤单
    return server.post('/exchange/revoke_order', data)
}

export const symbols = (data) => { //币种信息列表
    return server.request('/exchange/symbols', {
        params: data
    })
}

export const getcodeinfo = (data) => { //获取币种信息详情
    return server.request('/exchange/get_code_info', {
        params: data
    })
}

export const realtimetrade = (data) => { //获取币种实时交易数据
    return server.request('/exchange/realtime_trade', {
        params: data
    })
}

export const gethandicap = (data) => { //获取币种盘口
    return server.request('/exchange/get_handicap', {
        params: data
    })
}

export const getcodedepth = (data) => { //获取币种深度
    return server.request('/exchange/get_code_depth', {
        params: data
    })
}